package club.zhangliyuanblog.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author liyuan.zhang
 * @date 2021/4/23 18:40
 */
@Service
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT", fallback = PaymentFallBackService.class)
public interface PaymentHystrixService {
    @GetMapping("/payment/hystrix/ok/{id}")
    String paymentOk(@PathVariable(value = "id") Integer id);

    @GetMapping("/payment/hystrix/timeout/{time}")
    String timeout(@PathVariable(value = "time") Integer time) ;

}
